#pragma once
#include "assert.h"

#include "sdl/sdl.h"
#pragma comment(lib, "sdl.lib")
#pragma comment(lib, "sdlmain.lib")
namespace ui
{
	struct UI
	{
		SDL_Window* window;
		SDL_Renderer* renderer;
		SDL_Texture* framebuffer;
		char* framebuffer_data;
		int pitch;
		int w;
		int h;
	};

	void set_color(UI ui, int x, int y, unsigned char r, unsigned char g, unsigned char b);
	void update_time_per_frame(UI ui, float time);
	UI init();
	//returns whether we should quit
	bool process_events(UI& screen);
	void begin_frame(UI& ui);
	void end_frame(UI ui);
	void quit(UI ui);
}